Method and apparatus of deriving intra prediction mode using most probable mode group

ABSTRACT

Provided is a method that constructs an MPM group including three intra prediction modes, determines the intra prediction mode of the MPM group specified by the prediction mode index as the intra prediction mode of the current prediction unit if the mode group indicator indicates the MPM group, and derives the intra prediction mode of the current prediction unit using the prediction mode index and the three prediction modes of the MPM group if the mode group indicator does not indicate the MPM group. Accordingly, additional bits resulted from increase of a number of intra prediction mode are effectively reduced. Also, an image compression ratio can be improved by generating a prediction block similar to an original block.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of the U.S. patent applicationSer. No. 14/349,985, filed on Apr. 4, 2014, which is a 371 ofinternational Patent Application No. PCT/CN2012/083972, filed on Nov. 2,2012, which claims priority to Korean Patent Application10-2011-0114606, filed on Nov. 4, 2011, which are incorporated byreference in their entirety.

TECHNICAL FIELD

The present invention relates to a method and an apparatus of derivingan intra prediction mode, and more particularly, to a method ofconstructing an MPM group using neighboring intra prediction modes andderiving the intra prediction mode using the MPM group and intraprediction information.

BACKGROUND ART

In image compression methods such as MPEG-1, MPEG-2, MPEG-4 andH.264/MPEG-4 AVC, one picture is divided into macroblocks to encode animage. Then, the respective macroblocks are encoded using interprediction or intra prediction.

In intra prediction, a current block of the picture is encoded not usinga reference picture, but using values of reconstructed pixels spatiallyadjacent to the current block. An optimal prediction mode with littledistortion is selected out of a plurality of intra prediction modes bycomparing a prediction block generated using the adjacent pixel valueswith an original block. Then, using the selected intra prediction modeand the adjacent pixel values, prediction values of the current blockare calculated. Differences between the prediction values and pixelsvalues of the original current block are calculated and then encodedthrough transform coding, quantization and entropy coding. The intraprediction mode is also encoded.

According to H.264 standard, there are nine modes in 4×4 intraprediction. The nine modes are a vertical mode, a horizontal mode, a DCmode, a diagonal down-left mode, a diagonal down-right mode, a verticalright mode, a vertical left mode, a horizontal-up mode and ahorizontal-down mode. One mode is selected among the nine modes togenerate a prediction block of the current block, the mode informationis transmitted to the decoder.

In HEVC standard under development, the number of intra prediction modesincreases to 18 or 35, the size of coding unit lies between 8×8 and128×128. The coding unit has similar purpose to the macroblock ofH.264/AVC.

Accordingly, if the intra prediction mode is encoded using the samemethod of H.264/AVC, the coding efficiency deteriorates because thenumber of intra prediction modes is greater than that of H.264/AVC.Also, as the size of the coding unit increases and the number of intraprediction modes increases, quantization method and scanning methodshould be modified to enhance the coding efficiency.

DISCLOSURE Technical Problem

The present invention is directed to a method and apparatus ofconstructing an MPM group using neighboring intra prediction modes andderiving the intra prediction mode using the MPM group and intraprediction information.

Technical Solution

One aspect of the present invention provides a method of deriving anintra prediction mode of a current prediction unit, comprising:entropy-decoding a mode group indicator and a prediction mode index,constructing an MPM group including three intra prediction modes,determining whether the mode group indicator indicates the MPM group ornot, determining an intra prediction mode of the MPM group specified bythe prediction mode index as the intra prediction mode of the currentprediction unit if the mode group indicator indicates the MPM group, andderiving the intra prediction mode of the current prediction unit usingthe prediction mode index and the three prediction modes of the MPMgroup if the mode group indicator does not indicate the MPM group.

Advantageous Effects

A method according to the present invention constructs an MPM groupincluding three intra prediction modes, determines the intra predictionmode of the MPM group specified by the prediction mode index as theintra prediction mode of the current prediction unit if the mode groupindicator indicates the MPM group, and derives the intra prediction modeof the current prediction unit using the prediction mode index and thethree prediction modes of the MPM group if the mode group indicator doesnot indicate the MPM group. Therefore, coding efficiency of intraprediction mode is improved by encoding the intra prediction mode of thecurrent block using a plurality of most probable candidates. Also,coding efficiency of intra prediction mode is improved by generating theprediction block very similar to an original block and by minimizing theamount of bits required to encode the residual block.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of an image coding apparatus according to thepresent invention.

FIG. 2 is a conceptual diagram illustrating intra prediction modesaccording to the present invention.

FIG. 3 is a block diagram of an image decoding apparatus according tothe present invention.

FIG. 4 is a flow chart illustrating a method of generating a predictionblock in intra prediction according to the present invention.

FIG. 5 is a flow chart illustrating a procedure of restoring intraprediction mode according to the present invention.

FIG. 6 is a conceptual diagram illustrating positions of referencepixels of a current block according to the present invention.

FIG. 7 is a block diagram illustrating an apparatus of generating aprediction block in intra prediction according to the present invention.

MODE FOR INVENTION

Hereinafter, various embodiments of the present invention will bedescribed in detail with reference to the accompanying drawings.However, the present invention is not limited to the exemplaryembodiments disclosed below, but can be implemented in various types.Therefore, many other modifications and variations of the presentinvention are possible, and it is to be understood that within the scopeof the disclosed concept, the present invention may be practicedotherwise than as has been specifically described.

FIG. 1 is a block diagram of an image coding apparatus 100 according tothe present invention.

Referring to FIG. 1, the image coding apparatus 100 according to thepresent invention includes a picture division unit 101, a transform unit103, a quantization unit 104, a scanning unit 105, an entropy codingunit 106, an inverse quantization unit 107, an inverse transform unit108, a post-processing unit 110, a picture storing unit 111, an intraprediction unit 112, an inter prediction unit 113, a subtracter 102 andan adder 109.

The picture division unit 101 divides a picture or a slice into aplurality of largest coding units (LCUs), and divides each LCU into oneor more coding units. The picture division unit 101 determinesprediction mode of each coding unit and a size of prediction unit and asize of transform unit.

An LCU includes one or more coding units. The LCU has a recursive quadtree structure to specify a division structure. Information specifyingthe maximum size and the minimum size of the coding unit is included ina sequence parameter set. The division structure is specified by one ormore split coding unit flags (split_cu_flags). The coding unit has asize of 2N×2N.

A coding unit includes one or more prediction units. In intraprediction, the size of the prediction unit is 2N×2N or N×N. In interprediction, the size of the prediction unit is 2N×2N, 2N×N, N×2N or N×N.When the prediction unit is an asymmetric partition in inter prediction,the size of the prediction unit may also be one of hN×2N, (2−h)N×2N,2N×hN and 2N×(2−h)N. The value of h is ½.

A coding unit includes one or more transform units. The transform unithas a recursive quad tree structure to specify a division structure. Thedivision structure is specified by one or more split transform unitflags (split_tu_flags). Information specifying the maximum size and theminimum size of the transform unit is included in a sequence parameterset.

The intra prediction unit 112 determines an intra prediction mode of acurrent prediction unit and generates one or more prediction blocksusing the intra prediction mode. The prediction block has the same sizeof the transform unit. The intra prediction unit 112 generates referencepixels if there are unavailable reference pixels of a current block,filters adaptively the reference pixels of the current block accordingto the size of the current block and the intra prediction mode, andgenerates a prediction block of the current block. The current block hasthe same size of the prediction block.

FIG. 2 is a conceptual diagram illustrating intra prediction modesaccording to the present invention. As shown in FIG. 2, the number ofintra prediction modes is 35. The DC mode and the planar mode arenon-directional intra prediction modes and the others are directionalintra prediction modes.

The inter prediction unit 113 determines motion information of thecurrent prediction unit using one or more reference pictures stored inthe picture storing unit 111, and generates a prediction block of theprediction unit. The motion information includes one or more referencepicture indexes indicating the reference pictures and one or more motionvectors.

The transform unit 103 transforms residual signals generated using anoriginal block and a prediction block to generate a transformed block.The residual signals are transformed in transform units. A transformtype is determined by the prediction mode and the size of the transformunit. The transform type is a DCT-based integer transform or a DST-basedinteger transform.

The quantization unit 104 determines a quantization parameter forquantizing the transformed block. The quantization parameter is aquantization step size. The quantization parameter is determined perquantization unit having a size equal to or larger than a referencesize. A quantization unit of the reference size is referred to as aminimum quantization unit. If the size of the coding unit is equal to orlarger than the reference size, the coding unit becomes the quantizationunit. A plurality of coding unit may be included in the minimumquantization unit. The reference size is one of allowable sizes of thecoding unit. The reference size is determined per a picture and includedin the picture parameter set.

The quantization unit 104 generates a quantization parameter predictorand generates a differential quantization parameter by subtracting thequantization parameter predictor from the quantization parameter. Thedifferential quantization parameter is encoded and transmitted to thedecoder. If there are no residual signals to be transmitted in thecoding unit, the differential quantization parameter of the coding unitmay not be transmitted.

The quantization parameter predictor is generated by using quantizationparameters of neighboring coding units and/or a quantization parameterof previous coding unit.

The quantization unit 104 sequentially retrieves a left quantizationparameter, an above quantization parameter and a previous quantizationparameter in this order. An average of the first two availablequantization parameters retrieved in that order is set as thequantization parameter predictor when at least two quantizationparameters are available. When only one quantization parameter isavailable, the available quantization parameter is set as thequantization parameter predictor. The left quantization parameter is aquantization parameter of the left neighboring coding unit. The abovequantization parameter is a quantization parameter of the aboveneighboring coding unit. The previous quantization parameter is aquantization parameter of a previous coding unit in coding order.

The quantization unit 104 quantizes the transformed block using aquantization matrix and the quantization parameter to generate aquantized block. The quantized block is provided to the inversequantization unit 107 and the scanning unit 105.

The scanning unit 105 determines a scan pattern and applies the scanpattern to the quantized block. When CABAC (Context adaptive binaryarithmetic coding) is used for entropy coding, the scan pattern isdetermined as follows.

In intra prediction, the scan pattern is determined by the intraprediction mode and the size of the transform unit. The scan pattern isselected among a diagonal scan, a vertical scan and a horizontal scan.The quantized transform coefficients of the quantized block are dividedinto significant coefficients, sign flags and levels. The scan patternis applied to the significant coefficients, sign flags and levelsrespectively.

When the size of the transform unit is equal to or smaller than a firstsize, the horizontal scan is selected for the vertical mode and apredetermined number of neighboring intra prediction modes of thevertical mode, the vertical scan is selected for the horizontal mode andthe predetermined number of neighboring intra prediction modes of thehorizontal mode, and the diagonal scan is selected for the other intraprediction modes. The first size is 8×8.

When the size of the transform unit is larger than the first size, thediagonal scan is selected for all intra prediction modes.

In inter prediction, a predetermined scan pattern is used. Thepredetermined scan pattern is the diagonal scan.

When the size of the transform unit is larger than a second size, thequantized block is divided into a plurality of subsets and scanned. Thesecond size is 4×4. The scan pattern for scanning the subsets is thesame as the scan pattern for scanning quantized transform coefficientsof each subset. The quantized transform coefficients of each subset arescanned in the reverse direction. The subsets are also scanned in thereverse direction.

Last non-zero position is encoded and transmitted to the decoder. Thelast non-zero position specifies position of last non-zero quantizedtransform coefficient within the transform unit.

Non-zero subset flags are determined and encoded. The non-zero subsetflag indicates whether the subset contains non-zero coefficients or not.The non-zero subset flag is not defined for a subset covering a DCcoefficient and a subset covering last non-zero coefficient.

The inverse quantization unit 107 inversely quantizes the quantizedtransform coefficients of the quantized block.

The inverse transform unit 108 inversely transforms the inversequantized block to generate residual signals of the spatial domain.

The adder 109 generates a reconstructed block by adding the residualblock and the prediction block.

The post-processing unit 110 performs a deblocking filtering process forremoving blocking artifact generated in a reconstructed picture.

The picture storing unit 111 receives post-processed image from thepost-processing unit 110, and stores the image in picture units. Apicture may be a frame or a field.

The entropy coding unit 106 entropy-codes the one-dimensionalcoefficient information received from the scanning unit 105, intraprediction information received from the intra prediction unit 112,motion information received from the inter prediction unit 113, and soon.

FIG. 3 is a block diagram of an image decoding apparatus 200 accordingto the present invention.

The image decoding apparatus 200 according to the present inventionincludes an entropy decoding unit 201, an inverse scanning unit 202, aninverse quantization unit 203, an inverse transform unit 204, an adder205, a post processing unit 206, a picture storing unit 207, an intraprediction unit 208 and an inter prediction unit 209.

The entropy decoding unit 201 extracts the intra prediction information,the inter prediction information and the one-dimensional coefficientinformation from a received bit stream. The entropy decoding unit 201transmits the inter prediction information to the inter prediction unit209, the intra prediction information to the intra prediction unit 208and the coefficient information to the inverse scanning unit 202.

The inverse scanning unit 202 uses an inverse scan pattern to generatetwo dimensional quantized block. It is supposed that CABAC is used asentropy coding method. The inverse scan pattern is one of the diagonalscan, the vertical scan and the horizontal scan.

In intra prediction, the inverse scan pattern is determined by the intraprediction mode and the size of the transform unit. The inverse scanpattern is selected among the diagonal scan, the vertical scan and thehorizontal scan. The selected inverse scan pattern is applied to thesignificant coefficients, the sign flags and the levels respectivelygenerate the quantized block.

When the size of the transform unit is equal to or smaller than thefirst size, the horizontal scan is selected for the vertical mode and apredetermined number of neighboring intra prediction modes of thevertical mode, the vertical scan is selected for the horizontal mode andthe predetermined number of neighboring intra prediction modes of thehorizontal mode, and the diagonal scan is selected for the other intraprediction modes. The first size is 8×8.

When the size of the transform unit is larger than the first size, thediagonal scan is selected for all intra prediction modes.

In inter prediction, the diagonal scan is used.

When the size of the transform unit is larger than the second size, thesignificant coefficients, the sign flags and the levels are inverselyscanned in the unit of the subset to generate subsets. And the subsetsare inversely scanned to generate the quantized block. The second sizeis 4×4.

The inverse scan pattern used for generating each subset is the same asthe inverse scan pattern used for generating the quantized block. Thesignificant coefficients, the sign flags and the levels are scanned inthe reverse direction. The subsets are also scanned in the reversedirection.

The last non-zero position and the non-zero subset flags are receivedfrom the encoder. The last non-zero position is used to determine thenumber of subsets to be generated. The non-zero subset flags are used todetermine the subsets to be generated by applying the inverse scanpattern. The subset covering the DC coefficient and the subset coveringthe last non-zero coefficient are generated using the inverse scanpattern because the non-zero subset flags for a subset covering a DCcoefficient and a subset covering last non-zero coefficient are nottransmitted.

The inverse quantization unit 203 receives the differential quantizationparameter from the entropy decoding unit 201 and generates thequantization parameter predictor. The quantization parameter predictoris generated through the same operation of the quantization unit 104 ofFIG. 1. Then, the inverse quantization unit 203 adds the differentialquantization parameter and the quantization parameter predictor togenerate the quantization parameter of the current coding unit. If thecurrent coding unit is equal to or larger than the minimum quantizationunit and the differential quantization parameter for the current codingunit is not received from the encoder, the differential quantizationparameter is set to 0.

The inverse quantization unit 203 inversely quantizes the quantizedblock.

The inverse transform unit 204 inversely transforms the inverselyquantized block to restore a residual block. The inverse transform typeis adaptively determined according to the prediction mode and the sizeof the transform unit. The inverse transform type is the DCT-basedinteger transform or the DST-based integer transform.

The intra prediction unit 208 restores the intra prediction mode of thecurrent prediction unit using the received intra prediction information,and generates a prediction block according to the restored intraprediction mode. The prediction block has the same size of the transformunit. The intra prediction unit 250 generates reference pixels if thereare unavailable reference pixels of the current block, and filtersadaptively the reference pixels of the current block according to thesize of the current block and the intra prediction mode. The currentblock has the same size of the transform unit.

The inter prediction unit 209 restores the motion information of thecurrent prediction unit using the received inter prediction information,and generates a prediction block using the motion information.

The post-processing unit 206 operates the same as the post-processingunit 110 of FIG. 1.

The picture storing unit 207 receives post-processed image from thepost-processing unit 206, and stores the image in picture units. Apicture may be a frame or a field.

The adder 205 adds the restored residual block and a prediction block togenerate a reconstructed block.

FIG. 4 is a flow chart illustrating a method of generating a predictionblock in intra prediction according to the present invention.

Intra prediction information of the current prediction unit isentropy-decoded (S110).

The intra prediction information includes a mode group indicator and aprediction mode index. The mode group indicator is a flag indicatingwhether the intra prediction mode of the current prediction unit belongsto a most probable mode group (MPM group). If the flag is 1, the intraprediction unit of the current prediction unit belongs to the MPM group.If the flag is 0, the intra prediction unit of the current predictionunit belongs to a residual mode group. The residual mode group includesall intra prediction modes other than the intra prediction modesbelonging to the MPM group. The prediction mode index specifies theintra prediction mode of the current prediction unit within the groupspecified by the mode group indicator.

The intra prediction mode of the current prediction unit is derivedusing the intra prediction information (S120).

FIG. 5 is a flow chart illustrating a procedure of deriving intraprediction mode according to the present invention. The intra predictionmode of the current prediction unit is derived using the followingordered steps.

The MPM group is constructed using intra prediction modes of theneighboring prediction units (S121). The intra prediction modes of theMPM group are adaptively determined by a left intra prediction mode andan above intra prediction mode. The left intra prediction mode is theintra prediction mode of the left neighboring prediction unit, and theabove intra prediction mode is the intra prediction mode of the aboveneighboring prediction unit. The MPM group is comprised of three intraprediction modes.

If the left or above neighboring prediction unit does not exist, theintra prediction mode of the left or above neighboring unit is set asunavailable. For example, if the current prediction unit is located atthe left or upper boundary of a picture, the left or above neighboringprediction unit does not exist. If the left or above neighboring unit islocated within other slice or other tile, the intra prediction mode ofthe left or above neighboring unit is set as unavailable. If the left orabove neighboring unit is inter-coded, the intra prediction mode of theleft or above neighboring unit is set as unavailable. If the aboveneighboring unit is located within other LCU, the intra prediction modeof the left or above neighboring unit may be set as unavailable.

When both of the left intra prediction mode and the above intraprediction mode are available and are different each other, the leftintra prediction mode and the above intra prediction mode are includedin the MPM group and one additional intra prediction mode is added tothe MPM group. Index 0 is assigned to one intra prediction mode of smallmode number and index 1 is assigned to the other. Alternatively, index 0may be assigned to the left intra prediction mode and index 1 may beassigned to the above intra prediction mode. The additional intraprediction mode is determined by the left and above intra predictionmodes as follows.

If one of the left and above intra prediction modes is a non-directionalmode and the other is a directional mode, the other non-directional modeis added to the MPM group. For example, if the one of the left and aboveintra prediction modes is the DC mode, the planar mode is added to theMPM group. If the one of the left and above intra prediction modes isthe planar mode, the DC mode is added to the MPM group. If both of theleft and above intra prediction modes are non-directional modes, thevertical mode is added to the MPM group. If both of the left and aboveintra prediction modes are directional modes, the DC mode or the planarmode is added to the MPM group.

When only one of the left intra prediction mode and the above intraprediction mode is available, the available intra prediction mode isincluded in the MPM group and two additional intra prediction modes areadded to the MPM group. The added two intra prediction modes aredetermined by the available intra prediction modes as follows.

If the available intra prediction mode is a non-directional mode, theother non-directional mode and the vertical mode are added to the MPMgroup. For example, if the available intra prediction mode is the DCmode, the planar mode and the vertical mode are added to the MPM group.If the available intra prediction mode is the planar mode, the DC modeand the vertical mode are added to the MPM group. If the available intraprediction mode is a directional mode, two non-directional modes (DCmode and planar mode) are added to the MPM group.

When both of the left intra prediction mode and the above intraprediction mode are available and are same each other, the availableintra prediction mode is included in the MPM group and two additionalintra prediction modes are added to the MPM group. The added two intraprediction modes are determined by the available intra prediction modesas follows.

If the available intra prediction mode is a directional mode, twoneighboring directional modes are added to the MPM group. For example,if the available intra prediction mode is the mode 23, the leftneighboring mode (mode 1) and the right neighboring mode (mode 13) areadded to the MPM group. If the available intra prediction mode is themode 30, the two neighboring modes (mode 2 and mode 16) are added to theMPM group. If the available intra prediction mode is a non-directionalmode, the other non-directional mode and the vertical mode are added tothe MPM group. For example, if the available intra prediction mode isthe DC mode, the planar mode and the vertical mode are added to the MPMgroup.

When both of the left intra prediction mode and the above intraprediction mode are unavailable, three additional intra prediction modesare added to the MPM group. The three intra prediction modes are the DCmode, the planar mode and the vertical mode. Indexes 0, 1 and 2 areassigned to the three intra prediction modes in the order of the DCmode, the planar mode and the vertical mode or in the order of theplanar mode, the DC mode and the vertical mode.

It is determined whether the mode group indicator indicates the MPMgroup (S122).

If the mode group indicator indicates the MPM group, the intraprediction of the MPM group specified by the prediction mode index isdetermined as the intra prediction mode of the current prediction unit(S123).

If the mode group indicator does not indicate the MPM group, the intraprediction of the residual mode group specified by the prediction modeindex is determined as the intra prediction mode of the currentprediction unit (S124). The intra prediction mode of the current unit isderived using the prediction mode index and the intra prediction modesof the MPM group as the following ordered steps.

1) The three intra prediction modes of the MPM group are reordered inthe mode number order. The intra prediction mode with lowest mode numberis set to a first candidate. The intra prediction mode with middle modenumber is set to a second candidate. The intra prediction mode withhighest mode number is set to a third candidate.

2) The prediction mode index is compared with the first candidate. Ifthe prediction mode index is equal to or greater than the firstcandidate of the MPM group, the value of the prediction mode index isincreased by one. Otherwise, the value of the prediction mode index ismaintained.

3) The prediction mode index is compared with the second candidate. Ifthe prediction mode index is equal to or greater than the secondcandidate of the MPM group, the value of the prediction mode index isincreased by one. Otherwise, the value of the prediction mode index ismaintained.

4) The prediction mode index is compared with the third candidate. Ifthe prediction mode index is equal to or greater than the thirdcandidate of the MPM group, the value of the prediction mode index isincreased by one. Otherwise, the value of the prediction mode index ismaintained.

5) The value of the final prediction mode index is set as the modenumber of the intra prediction mode of the current prediction unit.

A size of the prediction block is determined based on the transform sizeinformation specifying the size of the transform unit (S130). Thetransform size information may be one or more split_transform_flagsspecifying the size of the transform unit.

If the size of the transform unit is equal to the size of the currentprediction unit, the size of the prediction block is equal to the sizeof the current prediction unit.

If the size of the transform unit is smaller than the size of thecurrent prediction unit, the size of the prediction block is equal tothe size of the transform unit. In this case, a process of generating areconstructed block is performed on each sub-block of the currentprediction unit. That is, a prediction block and a residual block of acurrent sub-block are generated and a reconstructed block of eachsub-block is generated by adding the prediction block and the residualblock. Then, a prediction block, a residual block and a reconstructedblock of the next sub-block in decoding order are generated. Therestored intra prediction mode is used to generate all prediction blocksof all sub-block. Some pixels of the reconstructed block of the currentsub-block are used as reference pixels of the next sub-block. Therefore,it is possible to generate a prediction block which is more similar tothe original sub-block.

Next, it is determined whether all reference pixels of the current blockare available, and reference pixels are generated if one or morereference pixels are unavailable (S140). The current block is thecurrent prediction unit or the current sub-block. The size of thecurrent block is the size of the transform unit.

FIG. 6 is a conceptual diagram illustrating the positions of referencepixels of the current block according to the present invention. As shownin FIG. 6, the reference pixels of the current block are comprised ofabove reference pixels located at (x=0, . . . , 2N−1, y=−1), leftreference pixels located at (x=1−, y=0, . . . , 2M−1) and a corner pixellocated at (x=−1, y=−1). N is the width of the current block and M isthe height of the current block.

If reconstructed pixels do not exist at corresponding positions orreconstructed pixels are located within another slice, the referencepixels are set as unavailable. In constrained intra prediction mode (CIPmode), the reconstructed pixels of inter mode are also set asunavailable.

If one or more reference pixels are unavailable, one or more referencepixels are generated for the one or more unavailable reference pixels asfollows.

If all reference pixels are unavailable, the value of 2^(L−1) issubstituted for the values of all the reference pixels. The value of Lis the number of bits used to represent luminance pixel value.

If available reference pixels are located at only one side of theunavailable reference pixel, the value of the reference pixel nearest tothe unavailable pixel is substituted for the unavailable referencepixel.

If available reference pixels are located at both sides of theunavailable reference pixel, the average value of the reference pixelsnearest to the unavailable pixel in each side or the value of thereference pixel nearest to the unavailable pixel in a predetermineddirection is substituted for each unavailable reference pixel.

Next, the reference pixels are adaptively filtered based on the intraprediction mode and the size of the current block (S150). The size ofthe current block is the size of the transform unit.

In the DC mode, the reference pixels are not filtered. In the verticalmode and the horizontal mode, the reference pixels are not filtered. Inthe directional modes other than the vertical and horizontal modes, thereference pixels are adaptively according to the size of the currentblock.

If the size of the current is 4×4, the reference pixels are not filteredin all intra prediction modes. For the size 8×8, 16×16 and 32×32, thenumber of intra prediction mode where the reference pixels are filteredincreases as the size of the current block becomes larger. For example,the reference pixels are not filtered in the vertical mode and apredetermined number of neighboring intra prediction mode of thevertical mode. The reference pixels are also not filtered in thehorizontal mode and the predetermined number of neighboring intraprediction mode of the horizontal mode. The predetermined number liesbetween 0 to 7 and decreases as the size of the current block is larger.

Next, a prediction block of the current block is generated using thereference pixels according to the restored intra prediction mode (S160).

In the DC mode, the prediction pixels of the prediction block aregenerated by averaging the N reference pixels located at (x=0, . . .N−1, y=−1) and the M reference pixels located at (x=−1, y=0, . . . M−1).Then, the prediction pixel adjacent to the reference pixel is filteredusing one or two adjacent reference pixels.

In the vertical mode, the prediction pixels of the prediction block aregenerated by copying the value of the corresponding vertical referencepixel. Then, the prediction pixels which are adjacent to the leftreference pixel are filtered by the left neighboring reference pixel andthe corner pixel.

In the horizontal mode, the prediction pixels of the prediction blockare generated by copying the value of the corresponding horizontalreference pixel. Then, the prediction pixels which are adjacent to theabove reference pixel are filtered by the above neighboring referencepixel and the corner pixel.

FIG. 7 is a block diagram illustrating an apparatus 300 of generating aprediction block in intra prediction according to the present invention.

The apparatus 300 according to the present invention includes a parsingunit 310, a prediction mode decoding unit 320, a prediction sizedetermining unit 330, a reference availability checking unit 340, areference pixel generating unit 350, a reference pixel filtering unit360 and a prediction block generating unit 370.

The parsing unit 310 restores the intra prediction information of thecurrent prediction unit from the bit stream.

The intra prediction information includes a mode group indicator and aprediction mode index. The mode group indicator is a flag indicatingwhether the intra prediction mode of the current prediction unit belongsto a most probable mode group (MPM group). If the flag is 1, the intraprediction unit of the current prediction unit belongs to the MPM group.If the flag is 0, the intra prediction unit of the current predictionunit belongs to a residual mode group. The residual mode group includesall intra prediction modes other than the intra prediction modesbelonging to the MPM group. The prediction mode index specifies theintra prediction mode of the current prediction unit within the groupspecified by the mode group indicator.

The prediction mode decoding unit 320 includes a MPM group constructingunit 321 and a prediction mode restoring unit 322.

The MPM group constructing unit 321 constructs the MPM group of thecurrent prediction unit. The MPM group is constructed using intraprediction modes of the neighboring prediction units. The intraprediction modes of the MPM group are adaptively determined by a leftintra prediction mode and an above intra prediction mode. The left intraprediction mode is the intra prediction mode of the left neighboringprediction unit, and the above intra prediction mode is the intraprediction mode of the above neighboring prediction unit. The MPM groupis comprised of three intra prediction modes.

The MPM group constructing unit 321 checks the availability of the leftintra prediction mode and the above intra prediction mode. If the leftor above neighboring prediction unit does not exist, the intraprediction mode of the left or above neighboring unit is set asunavailable. For example, if the current prediction unit is located atthe left or upper boundary of a picture, the left or above neighboringprediction unit does not exist. If the left or above neighboring unit islocated within other slice or other tile, the intra prediction mode ofthe left or above neighboring unit is set as unavailable. If the left orabove neighboring unit is inter-coded, the intra prediction mode of theleft or above neighboring unit is set as unavailable. If the aboveneighboring unit is located within other LCU, the intra prediction modeof the left or above neighboring unit is set as unavailable.

The MPM group constructing unit 321 constructs the MPM group as follows.

When both of the left intra prediction mode and the above intraprediction mode are available and are different each other, the leftintra prediction mode and the above intra prediction mode are includedin the MPM group and one additional intra prediction mode is added tothe MPM group. Index 0 is assigned to one intra prediction mode of smallmode number and index 1 is assigned to the other. Or index 0 is assignedto the left intra prediction mode and index 1 is assigned to the aboveintra prediction mode. The added intra prediction mode is determined bythe left and above intra prediction modes as follows.

If one of the left and above intra prediction modes is a non-directionalmode and the other is a directional mode, the other non-directional modeis added to the MPM group. For example, if the one of the left and aboveintra prediction modes is the DC mode, the planar mode is added to theMPM group. If the one of the left and above intra prediction modes isthe planar mode, the DC mode is added to the MPM group. If both of theleft and above intra prediction modes are non-directional modes, thevertical mode is added to the MPM group. If both of the left and aboveintra prediction modes are directional modes, the DC mode or the planarmode is added to the MPM group.

When only one of the left intra prediction mode and the above intraprediction mode is available, the available intra prediction mode isincluded in the MPM group and two additional intra prediction modes areadded to the MPM group. The added two intra prediction modes aredetermined by the available intra prediction modes as follows.

If the available intra prediction mode is a non-directional mode, theother non-directional mode and the vertical mode are added to the MPMgroup. For example, if the available intra prediction mode is the DCmode, the planar mode and the vertical mode are added to the MPM group.If the available intra prediction mode is the planar mode, the DC modeand the vertical mode are added to the MPM group. If the available intraprediction mode is a directional mode, two non-directional modes (DCmode and planar mode) are added to the MPM group.

When both of the left intra prediction mode and the above intraprediction mode are available and are same each other, the availableintra prediction mode is included in the MPM group and two additionalintra prediction modes are added to the MPM group. The added two intraprediction modes are determined by the available intra prediction modesas follows.

If the available intra prediction mode is a directional mode, twoneighboring directional modes are added to the MPM group. For example,if the available intra prediction mode is the mode 23, the leftneighboring mode (mode 1) and the right neighboring mode (mode 13) areadded to the MPM group. If the available intra prediction mode is themode 30, the two neighboring modes (mode 2 and mode 16) are added to theMPM group. If the available intra prediction mode is a non-directionalmode, the other non-directional mode and the vertical mode are added tothe MPM group. For example, if the available intra prediction mode isthe DC mode, the planar mode and the vertical mode are added to the MPMgroup.

When both of the left intra prediction mode and the above intraprediction mode are unavailable, three additional intra prediction modesare added to the MPM group. The three intra prediction modes are the DCmode, the planar mode and the vertical mode. Indexes 0, 1 and 2 areassigned to the three intra prediction modes in the order of the DCmode, the planar mode and the vertical mode or in the order of theplanar mode, the DC mode and the vertical mode.

The prediction mode restoring unit 322 derives the intra prediction modeof the current prediction unit using the mode group indicator and theprediction mode index as follows.

The prediction mode restoring unit 322 determines whether the mode groupindicator indicates the MPM group.

If the mode group indicator indicates the MPM group, the prediction moderestoring unit 322 determines the intra prediction of the MPM groupspecified by the prediction mode index as the intra prediction mode ofthe current prediction unit.

If the mode group indicator does not indicate the MPM group, theprediction mode restoring unit 322 determines the intra prediction ofthe residual mode group specified by the prediction mode index as theintra prediction mode of the current prediction unit. The intraprediction mode of the current unit is derived using the prediction modeindex and the intra prediction modes of the MPM group as the followingordered steps.

1) The three intra prediction modes of the MPM group are reordered inthe mode number order. The intra prediction mode with lowest mode numberis set to a first candidate. The intra prediction mode with middle modenumber is set to a second candidate. The intra prediction mode withhighest mode number is set to a third candidate.

2) The prediction mode index is compared with the first candidate. Ifthe prediction mode index is equal to or greater than the firstcandidate of the MPM group, the value of the prediction mode index isincreased by one. Otherwise, the value of the prediction mode index ismaintained.

3) The prediction mode index is compared with the second candidate. Ifthe prediction mode index is equal to or greater than the secondcandidate of the MPM group, the value of the prediction mode index isincreased by one. Otherwise, the value of the prediction mode index ismaintained.

4) The prediction mode index is compared with the third candidate. Ifthe prediction mode index is equal to or greater than the thirdcandidate of the MPM group, the value of the prediction mode index isincreased by one. Otherwise, the value of the prediction mode index ismaintained.

5) The value of the final prediction mode index is set as the modenumber of the intra prediction mode of the current prediction unit.

The prediction size determining unit 330 determines the size of theprediction block based on the transform size information specifying thesize of the transform unit. The transform size information may be one ormore split_transform_flags specifying the size of the transform unit.

If the size of the transform unit is equal to the size of the currentprediction unit, the size of the prediction block is equal to the sizeof the current prediction unit.

If the size of the transform unit is smaller than the size of thecurrent prediction unit, the size of the prediction block is equal tothe size of the transform unit. In this case, a process of generating areconstructed block is performed on each sub-block of the currentprediction unit. That is, a prediction block and a residual block of acurrent sub-block are generated and a reconstructed block of eachsub-block is generated by adding the prediction block and the residualblock. Then, a prediction block, a residual block and a reconstructedblock of the next sub-block in decoding order are generated. Therestored intra prediction mode is used to generate all prediction blocksof all sub-block. Some pixels of the reconstructed block of the currentsub-block are used as reference pixels of the next sub-block. Therefore,it is possible to generate a prediction block which is more similar tothe original sub-block.

The reference pixel availability checking unit 340 determines whetherall reference pixels of the current block are available. The currentblock is the current prediction unit or the current sub-block. The sizeof the current block is the size of the transform unit.

The reference pixel generating unit 350 generates reference pixels ifone or more reference pixels of the current block are unavailable.

If all reference pixels are unavailable, the value of 2^(L−1) issubstituted for the values of all the reference pixels. The value of Lis the number of bits used to represent luminance pixel value.

If available reference pixels are located at only one side of theunavailable reference pixel, the value of the reference pixel nearest tothe unavailable pixel is substituted for the unavailable referencepixel.

If available reference pixels are located at both sides of theunavailable reference pixel, the average value of the reference pixelsnearest to the unavailable pixel in each side or the value of thereference pixel nearest to the unavailable pixel in a predetermineddirection is substituted for each unavailable reference pixel.

The reference pixel filtering unit 360 adaptively filters the referencepixels based on the intra prediction mode and the size of the currentblock.

In the DC mode, the reference pixels are not filtered. In the verticalmode and the horizontal mode, the reference pixels are not filtered. Inthe directional modes other than the vertical and horizontal modes, thereference pixels are adaptively according to the size of the currentblock.

If the size of the current is 4×4, the reference pixels are not filteredin all intra prediction modes. For the size 8×8, 16×16 and 32×32, thenumber of intra prediction mode where the reference pixels are filteredincreases as the size of the current block becomes larger. For example,the reference pixels are not filtered in the vertical mode and apredetermined number of neighboring intra prediction mode of thevertical mode. The reference pixels are also not filtered in thehorizontal mode and the predetermined number of neighboring intraprediction mode of the horizontal mode. The predetermined number liesbetween 0 to 7 and decreases as the size of the current block is larger.

The prediction block generating unit 370 generates a prediction block ofthe current block using the reference pixels according to the restoredintra prediction mode.

In the DC mode, the prediction pixel of the prediction block which isnot adjacent to the reference pixel is generated by averaging the Nreference pixels located at (x=0, . . . N−1, y=−1) and the M referencepixels located at (x=−1, y=0, . . . M−1). The prediction pixel adjacentto the reference pixel is generated using the average value and one ortwo adjacent reference pixels.

In the vertical mode, the prediction pixels which are not adjacent tothe left reference pixel are generated by copying the value of thevertical reference pixel. The prediction pixels which are adjacent tothe left reference pixel are generated by the vertical reference pixeland variance between the corner pixel and the left neighboring pixel.

In the horizontal mode, the prediction pixels are generated using thesame method.

While the invention has been shown and described with reference tocertain exemplary embodiments thereof, it will be understood by thoseskilled in the art that various changes in form and details may be madetherein without departing from the spirit and scope of the invention asdefined by the appended claims.

The invention claimed is:
 1. A method of generating a prediction block,comprising: entropy-decoding a mode group indicator and a predictionmode index; constructing a Most Probable Mode (MPM) group includingthree intra prediction modes using a left intra prediction mode and anabove intra prediction mode of a current prediction unit, deriving anintra prediction mode of the current prediction unit using the modegroup indicator and the prediction mode index; adaptively filteringreference pixels of a current block according to a size of a transformunit and the intra prediction mode of the current prediction unit; andgenerating the prediction block according to the intra prediction modeof the current prediction unit, wherein if the mode group indicatorindicates the MPM group, the intra prediction mode of the currentprediction unit is set to an intra prediction mode of the MPM groupspecified by the prediction mode index, and if the mode group indicatordoes not indicate the MPM group, the intra prediction mode of thecurrent prediction unit is determined by performing ordered sub-stepsof: increasing a value of the prediction mode index by one if theprediction mode index is equal to or greater than a first candidate ofthe MPM group; increasing the value of the prediction mode index by oneif the prediction mode index is equal to or greater than a secondcandidate of the MPM group; increasing the value of the prediction modeindex by one if the prediction mode index is equal to or greater than athird candidate of the MPM group; and determining the value of theprediction mode index as the mode number of the intra prediction mode ofthe current prediction unit.
 2. The method of claim 1, wherein the firstcandidate is an intra prediction mode having lowest mode number, thesecond candidate is an intra prediction mode having middle mode numberand the third candidate is an intra prediction mode having highest modenumber.
 3. The method of claim 1, wherein the three intra predictionmodes are reordered in the order of mode number to determine the firstcandidate, the second candidate and the third candidate.
 4. The methodof claim 1, wherein when the left intra prediction mode is not equal tothe above intra prediction mode and at least one of the left intraprediction mode and the above intra prediction mode is a non-directionalintra prediction mode, the MPM group includes both the non-directionalintra prediction modes.
 5. The method of claim 4, wherein when the leftintra prediction mode and the above intra prediction mode arenon-directional intra prediction modes, the MPM group includes both thenon-directional intra prediction modes and a vertical mode.
 6. Themethod of claim 1, wherein a size of the current block is equal to thesize of a transform unit.